<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript">
            
            function validate_required(field, alertext){
                with(field){
                    if(value==null||value==""){
                        alert(alertext);
                        return false;
                    }else{
                        return true;
                    }
                }
            }
            function validate_text(field,alertext)
            {
                with(field)
                {
                    var alphaExp = /^[a-zA-Z ]+$/;
                    if(field.value.match(alphaExp))
                    {
                        return true;
                    }
					
                    else
                    {
                        alert(alertext);
                        return false;
                    }
                }	
            }

            function validate_form(thisform){
                with(thisform){
                    if(validate_required(usr, "Enter your user name")==false||validate_text(usr, "Enter your user name correctly")==false){
                        usr.focus();
                        return false;
                    }
                    if(validate_required(pwd, "Enter your password")==false||validate_text(pwd, "Enter your password correctly")==false){
                        pwd.focus();
                        return false;
                    }
                }
            }            
        </script>
    </head>
    <body>
                <form name="MyForm" method="post" action="login_validation_db.jsp" onsubmit="return validate_form(this)">
            <table border=0>
                <tr>
                    <td>Username </td>
                    <td><input type="text" size="20" name="usr"></td>
                </tr>
                <tr>
                    <td>Password </td>
                    <td><input type="password" size="20" name="pwd"></td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align: center"><input type="submit" value="Sign in"></td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align: center;color: #000000;"><a href="forgotPassword.html">Forgot Password</a>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align: center;color: #000000;">New user <a href="registration.jsp">Sign up</a></td>
                </tr>

            </table>
        </form>

    </body>
</html>
